<template>
    <div class="user-information-container">
        <div class="information-header">
            <div>
                <p style="padding: 10px 50px 10px ;text-align: left;font-weight:bold">个人资料</p>
            </div>
        </div>
        <div class="information-content">
            <div>
                <el-row>
                    <el-col :span="8">
                        <el-form ref="userInfoForm" :model="userInfoForm" label-width="100px">
                            <el-form-item label="用户名" prop="username" v-model="userInfoForm.username">
                            </el-form-item>
                            <el-form-item label="邮箱" prop="email" v-model="userInfoForm.email">
                            </el-form-item>
                        </el-form>
                    </el-col>
                </el-row>
            </div>
        </div>
    </div>
</template>

<script>
// import { mapGetters, mapActions } from 'vuex'
// import userinfoService from 'services/userinfoService.js'
// import * as notifyUtil from 'utils/notifyUtil.js'

export default {
  components: {},
  // computed: mapGetters({
  //   nowUser: 'nowUser'
  // }),
  data() {
    return {
      userInfoForm: {
        username: '',
        email: ''
      }
    }
  },
  methods: {
    // ...mapActions({
    //   setNowUser: 'setNowUser'
    // }),
    // addUserInfo() {
    //   let userInfo = {
    //     userid: this.nowUser.id,
    //     phone: parseInt(this.userInfoForm.phone),
    //     wechat: this.userInfoForm.wechat,
    //     address: this.userInfoForm.address
    //   }
    //   userinfoService.addUserInfo(userInfo).then(response => {
    //     if (response.data.id === null || response.data.id === undefined) {
    //       notifyUtil.showError('更新用户信息', '失败，服务器错误')
    //     } else {
    //       notifyUtil.showSuccess('更新用户信息', '成功')
    //     }
    //   })
    // }
  }
}
</script>

<style scoped>
.user-information-container {
  margin-top: 50px;
  width: 1070px;
  height: 100%;
  float: left;
  /* text-align: left; */
  /* border: 1px solid #DCDFE6; */
  background-color: #ffffff;
}
.photo-holder {
  text-align: left;
  position: relative;
  float: right;
  height: 100%;
  width: 100%;
}
.photo-holder .span {
  text-align: left;
  position: relative;
  float: left;
}
</style>